package com.xia.demo.loader;

public class MyClassLoader extends ClassLoader{

    @Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        return super.findClass("D:\\lib");
    }

    public static void main(String[] args) throws ClassNotFoundException {
        MyClassLoader myClassLoader = new MyClassLoader();
        Class<?> test1 = myClassLoader.loadClass("com.xia.demo.Test1");
        System.out.println("test1 = " + test1);

    }

}
